package com.itheima.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itheima.bean.Category;

import java.util.List;

/**
 * @author hebing
 * @version 1.0
 */
public interface CategoryService {

    int add(Category category);

    IPage<Category> findPage(Long page, Long pageSize);

    int deleteById(Long id);

    /**
     * 修改
     * @param category
     * @return
     */
    int update(Category category);

    /**
     * 根据类型进行查询
     * @param type
     * @return
     */
    List<Category> selectByType(Integer type);

    /**
     * 根据id查询菜名
     * @param categoryId
     * @return
     */
    Category selectNameByCategoryId(Long categoryId);
}
